<?php //var_dump($this->table);
$prevcontrol="";
?>
<?php if(count($this->table)>0):?>
<table>
<tr><th>Authorization</th><th>Invite</th><th>Admin</th><th>Client</th><th>Formateur</th></tr>
<?php foreach ($this->table as $item):?>
<?php 
$cont = $item['label'];
?>
<?php if($prevcontrol!=$cont):?>
<?php echo $prevcontrol!="" ? "</tr>": "";?><tr><td><?php echo $this->escape($item['label']);?></td><td><input type ="checkbox" name="<?php echo $item['id'];$prevcontrol=$cont;?>" value="<?php echo $this->escape($item['value']);?>" <?php echo $item['value']==1 ? "CHECKED":"";?>/></td>
<?php else :?>
<td><input type ="checkbox" name="<?php echo $item['id'];?>" value="<?php echo $this->escape($item['value']);?>" <?php echo $item['value']==1 ? "CHECKED":"";?>/></td>
<?php endif;?>
<?php endforeach;?>
</table>
<?php endif;?>